<%@ page language="java" import="java.util.*,java.net.URLDecoder" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%String ctx = request.getContextPath();%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<s:url value="/css/base.css" />" rev="stylesheet" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="<%=ctx%>/js/jquery/jquery-1.4.2.min.js"></script>
</head>

<body class="bg1_index">
	<form id='loginForm' action="<%=ctx%>/user/login.action" method="post">
    <div>
        <div style="width:600px;margin:auto;margin-top:150px" class="bg2">
		    <div class="f_l" style="width:250px; height:245px"><img src="img/business/dl_03.jpg"></div>
            <div class="f_l bg2_index" style="width:340px; height:245px;margin:auto">
			<table width="96%"  align="right" border="0" cellspacing="0" style="height:26px; line-height:26px">
			<tr>
                <td colspan="2" class="txt_gray1 padding1">上海宝翼汽车服务有限公司</td>
            </tr>
			<tr>
                <td colspan="2" class="txt_gray2" style=" border-bottom-style:solid; border-bottom-color:#CCCCCC; border-bottom-width:1px">宝翼汽修管理平台 V1.0</td>
            </tr>
            <tr>
              <td class="txt_gray3 padding1">邮&nbsp;&nbsp;&nbsp;箱:</td>
              <td class="padding1"><input name="user.email" value="<s:property value='user.email' />" /></td></tr>
           <tr>
              <td class="txt_gray3">密&nbsp;&nbsp;&nbsp;码:</td>
              <td><span class="padding1">
                <input style="width:149px" name="user.password" type="password" />
              </span>
              <span class="txt_gray2"> &nbsp;&nbsp;<a href="<%=ctx%>/findPassword.jsp">找回密码</a></span></td>
           </tr>
           <tr>
             <td class="txt_gray3">校验码:</td>
             <td>
             	<input type="text" name="verifyCode" value="" /><img style="margin:0 0 -6px 10px" onclick="javascript:getImage(this)" alt="" src="<%=ctx%>/validator/verifyCode.jsp">
             </td>
           </tr>
           <tr>
           	  <td colspan="2" style="color:red;">
           	  	<div style="height:22px;">
				  ${failInfo }
				  ${param.failInfo }
				</div>
			  </td>
           </tr>
           <tr>
           	<td colspan="2">
	            <div style="margin-left: 100px;" class="btn f_l margin2 t_c" ><a onclick="javascript:formSubmit('loginForm')" href="#" >登&nbsp;录</a></div>
            </td>
           </tr>

            </table>
			</div>
			<div class="f_l"><img src="img/business/ddd_06.jpg" border="0"></div>
        </div>
    </div>
    <script type="text/javascript">
    	$(window).ready(initkeySubmit);
	  	function getImage(element){
	  	  element.src = '<%=request.getContextPath()%>/validator/verifyCode.jsp?'+ Math.random();
	    }
	    function formSubmit(formId){
			document.getElementById(formId).submit();
		}
		function formReset(formId){
			document.getElementById(formId).reset();	
		}
		function initkeySubmit(){
			$('#loginForm').find('input').keydown(function(event){
				if(13==event.keyCode){
					formSubmit('loginForm');
				}
			});
		}
	</script>
   </form>
</body>

</html>
